﻿using BLL;
using Model;
using System;

namespace Thksoft.UserCotrols
{
    public partial class CtrlUrgentMX : System.Web.UI.UserControl
    {
        private QS_URGENTFUNDSAPPLYBLL urgBll = new QS_URGENTFUNDSAPPLYBLL();

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string busId = "";

                if (Request.QueryString["N_business_id"] != null)
                {
                    busId = Request.QueryString["N_business_id"].ToString();
                }

                if (Request.QueryString["BusinessId"] != null)
                {
                    busId = Request.QueryString["BusinessId"].ToString();
                }

                hidId.Value = busId;

                Bind();
            }
        }

        public void Bind()
        {
            QS_URGENTFUNDSAPPLY model = urgBll.Find(hidId.Value);

            if (model != null)
            {
                lblCom.Text = new Sys_CompanyBLL().Find(model.N_COMPANY_ID).CMY_NAME;
                lbldate.Text = model.D_DATA.ToString("yyyy-MM-dd");
                lblTitle.Text = model.C_TITLE;

                lblDfzh.Text = model.C_ACCOUNT;
                lblDfzhName.Text = model.C_ACCOUNT_NAME;
                lblamont.Text = model.N_AMOUNT.ToString();

                Text1.Text = model.C_EVENT;
                lblRemark.Text = model.C_REMARK;
            }
        }

        protected void btnSave_Click(object sender, EventArgs e)
        {
        }
    }
}